package com.ymttest.database.mapping;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.ymttest.database.model.LiveRoom;

public interface LoggingMapper {
    
    @Select("select * from LiveBehavior where liveid=#{liveid} and userid=#{userid} order by createdtime desc")
    List<Map> selectLiveBehaviorById(@Param("liveid")Integer liveid,@Param("userid")Integer userid);
    @Select("select * from AccountingLog where bizno=#{bid} order by CreateTime desc")
    List<Map> selectPPAccoutingLogByBizno(Map m);
    @Select("select * from refundlog where refundid=#{rid} order by CreateTime desc")
    List<Map>  selectRefundMiscRequestLogByRefundId(Map m);
    
    @Select("<script>"
			+ "select * from LiveMessage"
    		+"<where>"
			+ "<if test='liveid !=null '>" + "liveid=#{liveid}	" + "</if>"
			+ "<if test='MsgType !=null '>" + "and MsgType=#{MsgType}	" + "</if>"
			+ "</where>" 
			+ "order by MsgTime " + "</script>")
    List<Map> selectLiveMessage(@Param("liveid")Integer liveid,@Param("MsgType")Integer MsgType);
}